package kokonut.shop.size;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable
public class Size {

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key id;

	private ExistingSizes size;
	private float price;
	private int stock;

	public Size(ExistingSizes size)
	{
		this.size = size;
	}

	public ExistingSizes getSize() {
		return size;
	}

	public String getSizeName() {
		return size.name();
	}

	public void setSize(ExistingSizes size) {
		this.size = size;
	}

	public float getPrice() {
		return price;
	}

	public void setPrice(float price) {
		this.price = price;
	}

	public int getStock() {
		return stock;
	}

	public void setStock(int stock) {
		this.stock = stock;
	}

}